home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 July / macformat-026.iso / mac / Shareware City / Science / µSim 1.0 folder / Libs / InitCursorBalloon.c < prev    next >
Encoding:
Text File  |  1994-07-16  |  933 b   |  36 lines  |  [TEXT/MMCC]

  1. /*
  2. Copyright © 1993,1994 by Fabrizio Oddone
  3. ••• ••• ••• ••• ••• ••• ••• ••• ••• •••
  4. This source code is distributed as freeware: you can copy, exchange, modify this
  5. code as you wish. You may include this code in any kind of application: freeware,
  6. shareware, or commercial, provided that full credits are given.
  7. You may not sell or distribute this code for profit.
  8. */
  9.  
  10. //#pragma load "MacDump"
  11.  
  12. #include    "InitCursorBalloon.h"
  13. #include    "CursorBalloon.h"
  14.  
  15. #if    !defined(FabNoSegmentDirectives)
  16. #pragma segment Init
  17. #endif
  18.  
  19. /* Initializes the manager; should be called after initializing QuickDraw, etc.
  20. should be put into the initialization segment of the application */
  21.  
  22. OSErr InitCursorBalloonManager(void)
  23. {
  24. register OSErr err = appMemFullErr;
  25.  
  26. mouseRgn = NewRgn();
  27. wideOpenRgn = NewRgn();
  28. if (mouseRgn && wideOpenRgn) {
  29.     ForceMouseMovedEvent();
  30.     SetRectRgn(wideOpenRgn, -32765, -32765, 32765, 32765);
  31.     err = noErr;
  32.     }
  33. return err;
  34. }
  35.  
  36.